export default function ({ app, route, redirect }) {
  let redirectURL = '/login'
  const path = route.path
  if (path) {
    redirectURL = '/login?ref=' + encodeURIComponent(path)
  }
  // 需要进行权限判断的页面开头
  if (!app.$cookies.get('token')) {
    redirect(redirectURL)
  }
}
